﻿<fw:FloatableWindow x:Class="Komunikator.Controls.ChatWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:fw="clr-namespace:System.Windows.Controls;assembly=FloatableWindow"
    mc:Ignorable="d"
    d:DesignHeight="500" d:DesignWidth="500">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <RichTextBox x:Name="rtbHistory" IsReadOnly="True" Margin="3" />
        
        <Grid Grid.Row="1" Margin="3, 1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <ToggleButton x:Name="bold" Grid.Column="0" Width="20" Click="bold_Click">
                <TextBlock Text="B" FontWeight="Bold" />
            </ToggleButton>
            <ToggleButton x:Name="italic" Grid.Column="1" Width="20" Margin="4, 0" Click="italic_Click">
                <TextBlock Text="I" FontStyle="Italic" />
            </ToggleButton>
            <ToggleButton x:Name="underline" Grid.Column="2" Width="20" Click="underline_Click">
                <TextBlock Text="U" TextDecorations="Underline"/>
            </ToggleButton>
        </Grid>
        <RichTextBox x:Name="rtbMessage" 
                     Height="100" 
                     Grid.Row="2" 
                     Margin="3" 
                     SelectionChanged="rtbMessage_SelectionChanged"/>
        <Button x:Name="Send" Content="Wyślij" Grid.Row="3" HorizontalAlignment="Right" Margin="3" />
    </Grid>
</fw:FloatableWindow>